﻿Imports DTO
Imports System.Data.OleDb

Public Class PhieuNhapSachDAO
    Public Function LuuPhieuNhapSach(ByVal NgayThang As DateTime) As Integer

        Dim cmd As OleDbCommand = New OleDbCommand()
        cmd.Connection = DataProvider.ConnectDB()
        cmd.CommandText = "insert into PHIEUNHAPSACH(NgayNhap) values (@NgayNhap)"
        Dim para As OleDbParameter = cmd.Parameters.Add("@NgayNhap", OleDbType.Date)
        ' para.Value = NgayThang
        para.Value = NgayThang
        cmd.ExecuteNonQuery()
        cmd.CommandText = "select @@IDENTITY"
        Return cmd.ExecuteScalar()

    End Function
End Class
